package cn.hwadee.muying.mapper;

import cn.hwadee.muying.commons.page.MyPage;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import cn.hwadee.muying.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 用户相关信息 Mapper 接口
 * </p>
 *
 * @author Tony
 * @since 2018-04-17
 */
@Mapper
@Component(value = "userMapper")
public interface UserMapper extends BaseMapper<User> {
    /**
     * 通过用户账号获取用户对象
     * @param account
     * @return
     */
    User selectByAccount(@Param("account") String account);


    List<User> list(@Param("page") MyPage<User> page, @Param("cUser") User cUser, @Param("keyword") String keyword) throws Exception;

    User selectByAccountAndTelephone(@Param("account") String account,@Param("telephone") String telephone);
}
